﻿<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的错误笔记</title>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<style>
h1 {
	font-size: 30px;
	color: #fff;
	text-transform: uppercase;
	font-weight: 300;
	text-align: center;
	margin-bottom: 15px;
}

table {
	width: 100%;
	table-layout: fixed;
}

.tbl-header {
	background-color: rgba(255, 255, 255, 0.3);
}

.tbl-content {
	height: 300px;
	overflow-x: auto;
	margin-top: 0px;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

th {
	padding: 20px 15px;
	text-align: left;
	font-weight: 500;
	font-size: 12px;
	color: #fff;
	text-transform: uppercase;
}

td {
	padding: 15px;
	text-align: left;
	vertical-align: middle;
	font-weight: 300;
	font-size: 12px;
	color: #fff;
	border-bottom: solid 1px rgba(255, 255, 255, 0.1);
}

/* demo styles */
@import
	url(https://fonts.googleapis.com/css?family=Roboto:400,500,300,700);

body {
	background: -webkit-linear-gradient(left, #25c481, #25b7c4);
	background: linear-gradient(to right, #25c481, #25b7c4);
	font-family: 'Roboto', sans-serif;
}

section {
	margin: 50px;
}

/* follow me template */
.made-with-love {
	margin-top: 40px;
	padding: 10px;
	clear: left;
	text-align: center;
	font-size: 10px;
	font-family: arial;
	color: #fff;
}

.made-with-love a {
	color: #fff;
	text-decoration: none;
}

.made-with-love a:hover {
	text-decoration: underline;
}

/* for custom scrollbar for webkit browser*/
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
	-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

.btn {
	text-decoration: none;
	color: #fff;
	background-color: rgba(0, 0, 255, .2);
	padding: 5px 10px;
	border-radius: 5px;
}

.btn:hover {
	background-color: rgba(0, 0, 255, .5);
	box-shadow: 0 0 5px 0 rgb(0, 0, 0);
}
</style>
<script>
	
</script>

</head>
<body>
	<section>
		<h1>事项列表</h1>
		<div class="tbl-header">
			<table cellpadding="0" cellspacing="0" border="0">
				<thead>
					<tr>
						<th>编号</th>
						<th>发表人</th>
						<th>发表时间</th>
						<th>标题</th>
						<th>解决时间</th>
						<th>标签</th>
						<th><a href="add" class="btn">新增记录</a> <a href="logout" class="btn">退出登录</a></th>
					</tr>
				</thead>
			</table>
		</div>
		<div class="tbl-content">
			<table cellpadding="0" cellspacing="0" border="0">
				<tbody>
					<c:forEach items="${allList}" var="item">
						<tr>
							<td>${item.value.getId()}</td>
							<td>${item.value.getUsername()}</td>
							<td>${item.value.getCreatetime()}</td>
							<td>${item.value.getTitle()}</td>
							<td>${item.value.getDealtime()}</td>
							<td>${item.value.getTip()}</td>
							<td>
								<a href="/ErrorRegister/detail?wrong_id=${item.value.getId()}" class="btn">详细</a> 
								<a href="/ErrorRegister/edit?wrong_id=${item.value.getId()}" class="btn">编辑</a>
								<a href="/ErrorRegister/del?wrong_id=${item.value.getId()}" onclick="return confirm('你确定要删除吗?');" class="btn">删除</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</section>


	<!-- follow me template -->
	<div class="made-with-love">
		<a target="_blank" href="https://gitee.com/is666a">小朋友制作</a>
	</div>


	<script>
		// '.tbl-content' consumed little space for vertical scrollbar, scrollbar width depend on browser/os/platfrom. Here calculate the scollbar width .
		$(window).on(
				"load resize ",
				function() {
					var scrollWidth = $('.tbl-content').width()
							- $('.tbl-content table').width();
					$('.tbl-header').css({
						'padding-right' : scrollWidth
					});
				}).resize();
	</script>
</body>
</html>